package com.qf.service;

import com.qf.entity.Hotal;
import com.qf.entity.SearchParams;

import java.io.IOException;
import java.util.List;

public interface ISearchService {

    /**
     * 创建索引库
     * @return
     */
    boolean createIndex() throws IOException;

    /**
     * 判断索引库是否存在
     * @return
     */
    boolean isIndex() throws IOException;

    /**
     * 删除索引库
     * @return
     */
    boolean deleteIndex() throws IOException;

    /**
     * 添加索引映射
     * @return
     */
    boolean addMappings() throws IOException;

    /**
     * 添加文档
     * @param hotal
     * @return
     */
    boolean addDocument(Hotal hotal) throws IOException;

    /**
     * 查询文档
     */
    List<Hotal> query(SearchParams searchParams) throws IOException;
}
